07. The src Directory

The src Directory

The src directory contains the following files:

  • main.cpp
  • model.h and model.cpp
  • render.h and render.cpp
  • route_model.h and `route_model.cpp
  • route_planner.h and `route_planner.cpp

You will be writing all of your code in main.cpp and route_planner.cpp , so we will cover those files first.


main.cpp

Main

The main.cpp controls the flow of the program, accomplishing four primary tasks:

  • The OSM data is read into the program.
  • A RouteModel object is created to store the OSM data in usable data structures.
  • A RoutePlanner object is created using the RouteModel . This planner will eventually carry out the A* search on the model data and store the search results in the RouteModel .
  • The RouteModel data is rendered using the IO2D library.

Your first task is to complete TODO in main.cpp .


route_planner.h and route_planner.cpp

Rp Full

These files define the RoutePlanner class and methods for the A* search . Your task is to implement the A* search by completing all of the TODOs in route_planner.cpp .